package controller;

import utils.MutableInteger;

/**
 * Class handles pre-turn requirements for special game
 */
public class SpecialGamePreTurn implements PreTurnHandler {

	private GameManager gameManager; // game manager object
	private MutableInteger turnCounter; // counts turns
	
	/**
	 * Constructor- creates a new object to perform pre-turn tasks of a special game
	 * @param gameManager- reference to game manager
	 * @param turnCounter- counts turn in game
	 */
	public SpecialGamePreTurn(GameManager gameManager, MutableInteger turnCounter) {
		
		// set members according to given values
		this.gameManager = gameManager;
		this.turnCounter = turnCounter;
	}
	
	/**
	 * Increments turn counter and places Creatures on board
	 */
	@Override
	public void preTurn() {	
		
		// increment turn counter
		turnCounter.inc();

		// place Creatures
		gameManager.placeCreatures();
	}
}